﻿using System;
using System.Threading.Tasks;

namespace AlyDdns
{
    public class Program
    {
        public static async Task Main(string[] args)
        {
            if (args.Length ==3)
            {
                var uiPort = int.Parse(args[0]);
                var alivePort = int.Parse(args[1]);
                var cfg = args[2];
                _ = UIService.StartAlive(alivePort);
                await UIService.Start(uiPort, cfg);
            }
            else
            {
                Console.WriteLine("eg:AlyDdns uiPort alivePort cfg");
                Console.WriteLine("eg:AlyDdns 8080 8181 esrinhome.x4tools.com.json");
            }
        }
    }
}
